@import "bourbon";
@import "../../core/color.scss";
@import "../../core/function.scss";

.re-custom-btn {
  margin-bottom: 10px;
  text-align: right;
  a {
    display: inline-block;
    background: $blue;
    border-radius: 2px;
    color: $white !important;
    font-size: 1.5rem;
    text-align: center;
    line-height: 30px;
    text-decoration: none !important;
    width: 100px;
  }
}
.re-table-scroll {
  max-height: 140px;
  margin: 20px 20px 10px;
  overflow: auto;
  &::-webkit-scrollbar {
    width: 6px;
    height: 6px;
  }
  &::-webkit-scrollbar-thumb {
    background: $blue;
    border-radius: 6px;
  }
}
.re-pop-list {
  list-style: none;
  .re-check-item {
    font-size: 1.5rem;
    margin-bottom: 10px;
    input[type="checkbox"] {
      position: absolute;
      opacity: 0;
    }
  }
}
.re-pop-btn {
  input {
    display: block;
    background: $blue;
    border: 0;
    border-radius: 2px;
    outline: 0;
    color: $white;
    font-size: 1.5rem;
    line-height: 30px;
    width: 60px;
    margin: auto;
    padding: 0;
  }
}
.re-table-wrapper {
  .table {
    &.re-more-cols {
      overflow-x: auto;
      display: block;
      thead {
        th {
          min-width: 115px;
        }
      }
      &::-webkit-scrollbar-track {
        background: $fa;
      }
      &::-webkit-scrollbar {
        width: 6px;
        height: 6px;
      }
      &::-webkit-scrollbar-thumb {
        background: $blue;
        border-radius: 4px;
      }
      scrollbar-track-color: $fa;
      scrollbar-base-color: $blue;
    }
    .re-table-loading {
      @include pos(absolute);
      width: 100%;
      height: 100%;
      top: 0;
      left: 0;
      tr {
        @include pos(absolute);
        text-align: center;
        width: 114px;
        height: 30px;
        top: 50%;
        left: 50%;
        margin-left: -57px;
        margin-top: -15px;
        img {
          width: 100%;
          height: auto;
        }
      }
      tr > td {
        border: none;
        text-align: center;
        img {
          display: inline-block;
          vertical-align: middle;
        }
      }
    }
    .re-table-loading-bg {
      background: $fa;
      opacity: 0.3;
      filter: Alpha(Opacity=30);
    }
    thead {
      border: 1px solid $f2;
      th {
        text-align: center;
        border-bottom: 0;
        font-weight: 400;
        padding-top: 9px;
        padding-bottom: 9px;
        background: $fa;
        .re-sort-icon {
          @include pos;
          margin-left: 5px;
          .re-icon-triangle-down,
          .re-icon-triangle-up {
            @include pos(absolute);
            font-size: 1.4rem;
            cursor: pointer;
            &.active {
              color: $blue;
            }
          }
          .re-icon-triangle-up {
            top: -1px;
            left: 0;
          }
          .re-icon-triangle-down {
            top: 6px;
            left: 0;
          }
        }
      }
    }
    tbody {
      border: 1px solid $f2;
      tr {
        text-align: center;
        td {
          border-top: 1px solid $f2;
          padding: 12px 8px;
        }
        .re-col-names {
          a {
            &:hover {
              span {
                text-decoration: underline;
              }
            }
          }
        }
      }
      .re-subitem {
        td {
          background: lighten($fa, 2%);
          span {
            color: $blue;
          }
        }
      }
      tr {
        @include transi;
        &:hover {
          background-color: $fa;
        }
      }
    }
  }
  @media (min-width: 1400px) {
    .table {
      &.re-more-cols {
        overflow-x: auto;
        display: table;
        thead {
          th {
            min-width: inherit;
          }
        }
      }
    }
  }
  .re-table-footer-nav {
    @include pos;
    .re-items-per-page {
      @include pos(absolute);
      top: 0;
      left: 0;
      z-index: 10;
      select {
        border-radius: 2px;
        outline: 0;
        height: 30px;
        margin: 0 5px;
        padding: 0 5px;
        cursor: pointer;
      }
    }
    .re-page-panel {
      width: 100%;
      text-align: center;
      min-height: 35px;
      @include pos;
      .pagination {
        margin: 0;
        li {
          display: inline-block;
          line-height: 30px;
          text-align: center;
          margin: 0 8px;
          &.disabled a,&.disabled a:hover{
            color: $border;
            border: 1px solid $border;
          }
          a {
            display: block;
            background: transparent;
            border: 1px solid $border;
            border-radius: 2px;
            color: inherit;
            line-height: 30px;
            width: 30px;
            height: 30px;
            padding: 0;
            &:hover {
              border-color: $blue;
              color: $blue;
            }
          }
        }
        @media screen and (max-width: 768px) {
          li {
            display: none;
            &:first-child, &:last-child {
              display: inline-block;
            }
          }
        }
        .active a {
          background: $blue;
          border: 0;
          color: $white !important;
        }
      }
      .re-go-to-page {
        @include pos(absolute);
        right: 0;
        top: 0;
        span {
          display: block;
          float: left;
          @include pos;
          top: 5px;
        }
        input {
          display: block;
          float: left;
          height: 32px;
          width: 40px;
          border: 1px solid $border;
          border-radius: 2px;
          margin: 0 5px;
          text-align: center;
        }
        button {
          width: 60px;
          height: 32px;
          background: $blue;
          border: 0;
          border-radius: 2px;
          color: $white;
          margin-left: 6px;
        }
      }
    }
    @media screen and (max-width: 768px) {
      .re-items-per-page,
      .re-go-to-page {
        display: none;
      }
    }
  }
}